{% extends "base.html" %}

{% block nav %}
    {% include "nav.html" %}
{% endblock %}

{% block content %}
<div class="container">
    <div class="row">
        <div class="col-md-10">
            <h1>Presentations</h1>
            {% if not presentations %}
                No presentations found. 
                <a href="{{ url_for('wizard_new_presentation') }}">Create your first one</a>.
            {% else %}
                <table class="table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Is Visible?</th>
                            <th>Web browswer voting?</th>
                        </tr>
                    </thead>
                    <tbody>
                    {% for p in presentations %}
                        <tr>
                            <td><a href="{{ url_for('wizard_edit_presentation', id=p.id) }}">{{ p.name }}</a></td>
                            <td>{{ p.is_visible }}</td>
                            <td><a href="{{ url_for('wizard_list_presentation_decisions', pres_id=p.id) }}">Manage choices</a></td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            {% endif %}
        </div>
    </div>
    <div class="row">
        <div class="col-md-10">
                <div class="btn-top-margin">
                    <a href="{{ url_for('wizard_new_presentation') }}"
                       class="btn btn-primary">New Presentation</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

